<%@ page language="java" contentType="text/html" pageEncoding="utf-8"%>
<%@page import="java.io.*,java.util.*,java.sql.*,com.animal.dao.*,com.animal.bean.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>个人信息</title>

<link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">
<link href="./bootstrap/css/styles.css" rel="stylesheet">

</head>

<body>
	<% 
	String ID = (String)session.getAttribute("ID");
	%>	
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="PaperFileManager.html"><span>实验动物</span>档案管理</a>
				<ul class="user-menu">
					<li class="dropdown pull-right">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> <%=ID%> <span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
							<li><a href="http://www.cau.edu.cn"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
							<li><a href="#"><span class="glyphicon glyphicon-cog"></span> Settings</a></li>
							<li><a href="login.jsp"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
						</ul>
					</li>
				</ul>
			</div>				
		</div>
	</nav>
		
	<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
		<form role="search">
			<div class="form-group">
				<input type="text" class="form-control" placeholder="Search">
			</div>
		</form>
		<ul class="nav menu">
			<li class="parent ">
				<a href="#">
					<span class="glyphicon glyphicon-list"></span> 管理员信息 <span data-toggle="collapse" href="#sub-item-1" class="icon pull-right"><em class="glyphicon glyphicon-s glyphicon-plus"></em></span> 
				</a>
				<ul class="children collapse" id="sub-item-1">
					<li>
						<a class="" href="PaperPersonalInfo.jsp">
							<span class="glyphicon glyphicon-share-alt"></span> 个人信息
						</a>
					</li>
					<li>
						<a class="" href="PaperChangePassword.jsp">
							<span class="glyphicon glyphicon-share-alt"></span> 修改密码
						</a>
					</li>
				</ul>
			</li>
			
			<li class="parent ">
				<a href="#">
					<span class="glyphicon glyphicon-list"></span> 纸质档案管理 <span data-toggle="collapse" href="#sub-item-2" class="icon pull-right"><em class="glyphicon glyphicon-s glyphicon-plus"></em></span> 
				</a>
				<ul class="children collapse" id="sub-item-2">
					<li>
						<a class="" href="PaperConfirmElec.jsp">
							<span class="glyphicon glyphicon-share-alt"></span> 确认电子档案
						</a>
					</li>
					<li>
						<a class="" href="PaperFileArchive.jsp">
							<span class="glyphicon glyphicon-share-alt"></span> 纸质档案归档
						</a>
					</li>
				</ul>
			</li>
			
			<li role="presentation" class="divider"></li>
			<li><a href="login.jsp"><span class="glyphicon glyphicon-user"></span>登录页面</a></li>
		</ul>
		<div class="attribution">Created by <a href="#">软工第9组</a></div>
	</div><!--/.sidebar-->
		
	
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">			
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="PaperFileManager.html"><span class="glyphicon glyphicon-home"></span></a></li>
				<li class="active">管理员信息 > 个人信息</li>
			</ol>
		</div>		
		<div class="row">
			<div class="col-md-4 col-md-offset-4">
				<h3><center><b>管理员信息 > 个人信息</b></center></h3>
				<%
					ManagerBean manager = ManagerManage.selectByID(ID);
				%>	
				<div class="login-panel panel panel-default"  style="margin-top:20px;">					
				<div class="panel-body">
					<form role="form" method="post" action="ServletUpdate?do=changepaperinfo">
						<fieldset>
							<div class="form-group">
								<label for="ID:">ID:</label>
								<input type="text" id="ID" name="ID" value="<%=manager.getID() %>" class="form-control" readonly>
							</div>
							<div class="form-group">
								<label for="Name:">Name:</label>
								<input type="text" id="Name" name="Name" value="<%=manager.getName() %>" class="form-control">
							</div>
							<div class="form-group">
								<label for="Gender:">Gender:</label>
							<%							
			  						if(manager.getGender().equals("male")){
		  					%>
		  							<input type="radio" name="Gender" value="male" checked>
		  							<label for="male">男</label>	
		  							<input type="radio" name="Gender" value="female">
		  							<label for="female">女</label>
		  					<%
		  							}
		  							else if(manager.getGender().equals("female")){
		  					%>
		  							<input type="radio" name="Gender" value="male">
		  							<label for="male">男</label>	
		  							<input type="radio" name="Gender" value="female" checked>
		  							<label for="female">女</label>
		  					<%			
		  							}
		  							else{
		  					%>
		  							<input type="radio" name="Gender" value="male">
		  							<label for="male">男</label>	
		  							<input type="radio" name="Gender" value="female">
		  							<label for="female">女</label>
		  					<%		
		  							}
							 %>								
							</div>
            				<div class="form-group">
								<label for="PhoneNumber:">PhoneNumber:</label>
								<input type="text" id="PhoneNumber" name="PhoneNumber" value="<%=manager.getPhoneNumber() %>" class="form-control">
							</div>
							<div class="form-group">
								<label for="Position:">Position:</label>
								<input type="text" id="Position" name="Position" value="<%=manager.getPosition() %>" class="form-control" readonly>
							</div>
							<div class="form-group">
								<label for="Email:">Email:</label>
								<input type="text" id="Email" name="Email" value="<%=manager.getEmail() %>" class="form-control">
							</div>
            				<div class="form-group">
            					<input class="form-control btn btn-primary" type="submit" OnClick="javascript:return confirm('确认修改为当前信息？');" style="width:50%;margin-left:25%;" value="保存">	
							</div>					
						</fieldset>
					</form>
				</div>
			</div>		
			</div>
		</div>
	</div>
	
	<script src="./bootstrap/js/jquery-3.1.0.min.js"></script>
	<script src="./bootstrap/js/bootstrap.min.js"></script>
	
	<script>
		!function ($) {     
 		    $(document).on("click","ul.nav li.parent > a > span.icon", function(){          
		        $(this).find('em:first').toggleClass("glyphicon-minus");      
		    }); 
		    $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);
		/**
		$(window).on('resize', function () {
			  if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
			})
			$(window).on('resize', function () {
			  if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
			})
			*/
	</script>

</body>

</html>
